package com.zbkj.front.controller.mszs;

import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.request.mszs.MszsIndexRequest;
import com.zbkj.common.response.CommonResult;
import com.zbkj.common.response.mszs.MszsIndexInfoResponse;
import com.zbkj.front.service.mszs.MszsIndexService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 民宿助手移动端-首页-相关接口controller
 * @author lingfe
 */
@Slf4j
@RestController("MszsIndexController")
@RequestMapping("api/front/mszs")
@Api(tags = "民宿助手-首页")
public class MszsIndexController {

    @Autowired
    private MszsIndexService mszsIndexService;

    @ApiOperation(value = "首页数据")
    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public CommonResult<MszsIndexInfoResponse> getIndexInfo(@ModelAttribute MszsIndexRequest request,@ModelAttribute PageParamRequest pageParamRequest) {
        return CommonResult.success(mszsIndexService.getIndexDate(request,pageParamRequest));
    }

}



